package com.zzyl.controller.customer;

import com.zzyl.base.ResponseResult;
import com.zzyl.controller.BaseController;
import com.zzyl.dto.UserLoginRequestDto;
import com.zzyl.service.MemberService;
import com.zzyl.vo.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description CustomerUserController
 * @Author Lwj
 * @Date 2024-08-30-19:36
 */
@RestController
@RequestMapping("/customer/user")
@Slf4j
@Api(tags = "客户管理")
public class CustomerUserController extends BaseController {
    @Autowired
    private MemberService memberService;

    /**
     * 小程序端登录
     * @param userLoginRequestDto
     * @return
     */
    @PostMapping("/login")
    @ApiOperation(value = "登录")
    public ResponseResult<LoginVo> login(@RequestBody UserLoginRequestDto userLoginRequestDto) {
        LoginVo loginVo = memberService.login(userLoginRequestDto);
        return success(loginVo);
    }
}








